<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ace="http://www.icefaces.org/icefaces/components"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
  <f:event type="preRenderView"
           listener="#{userManager.forwardToLoginIfNotLoggedIn}" />
  <h:head>
    <title><ui:insert name="title"></ui:insert></title>
    <link href="css/myStyle.css" rel="stylesheet" type="text/css" />
    <c:set var="root" value="#{request.contextPath}/" />
  </h:head>
  <h:body>
    <div id="page">
      <div id="header">
        <ui:insert name="header">
          <ui:include src="includes/header.xhtml"/>
        </ui:insert>
      </div>
      <ace:panel id="leftNav" rendered="#{userManager.isLogged}">
        <ui:insert name="leftNav" >
          <ui:include src="includes/leftNav.xhtml"/>
        </ui:insert>
      </ace:panel>
      <div id="content">
        <ui:insert name="content">

        </ui:insert>
      </div>
      <div class="clearfix"></div>
      <div id="footer">
        <ui:insert name="footer">
          <ui:include src="includes/footer.xhtml"/>
        </ui:insert>
      </div>
    </div>
  </h:body>
</html>

